home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Largest effective integer.
- Date: Mon, 15 Apr 96 23:36:44 GMT
- Organization: none
- Message-ID: <829611404snz@genesis.demon.co.uk>
- References: <4ke5gu$o7u@airdmhor.gen.nz> <smryanDpnDDn.418@netcom.com> <4kqtii$3r2@airdmhor.gen.nz>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4kqtii$3r2@airdmhor.gen.nz>
- gumboot@airdmhor.gen.nz "Simon Hosie" writes:
-
- >@#$%!?!:
- >> Measly little 32 bit integers and reals. I grew up on 60 and 48 bit integers,
- >> 120 bit doubles. And 65535 bit integers.
- >
- >> In other words, this all machine specfic. Look in <limits.h> if your
- >> compiler has one.
- >
- > Yes, but char short int and long have minimums defined for them, I was
- >hoping that there is a minimum for the mantissa of a float or double.
-
- The mantissa represents a value between 0 and 1. The standard does define
- minimum limits on its precision (well roughly in terms of the number
- of decimal digits that can distinguished):
-
- FLT_DIG 6
- DBL_DIG 10
- LDBL_DIG 10
-
- These don't guarantee that integers can be represented exactly though.
-
- > Is long double an ANSI type, by the way? I didn't think it was, but
- >Watcom supports it even though it's the same size as a double.
-
- long double is an ANSI defined type. E.g. a standard printf and scanf
- conversion specifier for it is %Lf
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-